package com.zx.service;

import com.zx.bean.Firm;
import com.zx.bean.Post;
import com.zx.mapper.PostMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@Service
public class PostService {
    @Autowired
    private PostMapper postMapper;

    public int addPost(Post post){
        return postMapper.addPost(post);
    }

    //删除
    public int delPost(int id){
        return postMapper.delPost(id);
    }
    //修改
    public Post updatePost(int id){
        return postMapper.updatePost(id);
    }
    //查询单个
    public Post findOnePost(int id){
        return postMapper.findOnePost(id);
    }
    //查询全部
    public List<Post> findAllPost(){
        return postMapper.findAllPost();
    }
}
